<?
$sub_menu = "230440";
include_once("./_common.php");

auth_check($auth[$sub_menu], "r");

$colspan = 8;

$g4['title'] = "멤버쉽 권한";
include_once ("$g4[admin_path]/admin.head.php");
?>

<?=subtitle($g4[title])?>

<table width=100% cellpadding=0 cellspacing=1>
<colgroup width=120>
<colgroup width=''>
<colgroup width=70>
<colgroup width=70>
<colgroup width=70>
<colgroup width=70>
<colgroup width=70>
<colgroup width=70>
<tr><td colspan='<?=$colspan?>' class='line1'></td></tr>
<tr class='bgcol1 bold col1 ht center'>
    <td> 멤버쉽 </td>
    <td> 게시판 </td>
    <td> 목록 </td>
    <td> 내용 </td>
    <td> 다운 </td>
    <td> 쓰기 </td>
    <td> 코멘트 </td>
    <td> <a href="mw.membership.board.form.php"><img src="<?=$g4[admin_path]?>/img/icon_insert.gif" border="0"></a> </td>
</tr>
<tr><td colspan='<?=$colspan?>' class='line2'></td></tr>

<?
$sql = "select * from $mw_cash[membership_board_table] order by ms_id, bo_table, mp_id";
$qry = sql_query($sql);

for ($i=0; $row=sql_fetch_array($qry); $i++)
{
    $sql1 = "select ms_name from $mw_cash[membership_table] where ms_id = '$row[ms_id]'";
    $row1 = sql_fetch($sql1);

    if (!$row1[ms_name]) $row1[ms_name] = "<span style='color:#888;'>삭제됨</span>";

    $sql2 = "select bo_subject from $g4[board_table] where bo_table = '$row[bo_table]'";
    $row2 = sql_fetch($sql2);

    $list = $i%2;
?>

<tr class='list<?=$list?> col1 ht center'>
    <td> <?=$row1[ms_name]?> </td>
    <td> <?=$row2[bo_subject]?> </td>
    <td> <? if ($row[mp_list]) echo "√"; ?> </td>
    <td> <? if ($row[mp_view]) echo "√"; ?> </td>
    <td> <? if ($row[mp_down]) echo "√"; ?> </td>
    <td> <? if ($row[mp_write]) echo "√"; ?> </td>
    <td> <? if ($row[mp_comment]) echo "√"; ?> </td>
    <td>
        <a href="mw.membership.board.form.php?w=u&mp_id=<?=$row[mp_id]?>"><img src="<?=$g4[admin_path]?>/img/icon_modify.gif"></a>
        <a href="javascript:del('mw.membership.board.update.php?w=d&mp_id=<?=$row[mp_id]?>');"><img src="<?=$g4[admin_path]?>/img/icon_delete.gif"></a>
    </td>
</tr>

<? } ?>

<?if (!$i)
        echo "<tr> <td style='height:100px; text-align:center;' colspan='$colspan' class='b'> 자료가 없습니다. </td></tr>";
?>

<tr><td colspan='<?=$colspan?>' class='line1'></td></tr>
</table>


<?
include_once ("$g4[admin_path]/admin.tail.php");
?>

